//
//  KQMessageHouseKeeperCell.swift
//  KangYunYouJia
//
//  Created by zhouxiang on 2021/3/10.
//  Copyright © 2021 kqdc. All rights reserved.
//

import UIKit

class KQMessageHouseKeeperCell: UITableViewCell {

    @IBOutlet weak var line: UIImageView!
    /// 房间
    @IBOutlet weak var houseNameLabel: UILabel!
    /// 管家
    @IBOutlet weak var keeperLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        //self.line.backgroundColor = KQCHAT_COLOR(242, 242, 242)
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    /// 获取高度
    public class func getCellHeight(model: KQMessageHouseKeeperModel?) -> CGFloat {
        let nameHeight = KQChatUtils.shared().sizeThatFits(CGSize(width: 250 - 56, height: CGFloat.greatestFiniteMagnitude), font: UIFont(name: KQCHAT_FONT_NAME, size: 15)!, text: model?.houseName ?? "").height
        let keeperHeight = KQChatUtils.shared().sizeThatFits(CGSize(width: 250 - 56, height: CGFloat.greatestFiniteMagnitude), font: UIFont(name: KQCHAT_FONT_NAME, size: 15)!, text: model?.nickname ?? "").height
        return nameHeight + keeperHeight + 25.0 + 2.0
    }
    
}
